package cn.com.do4u.service;

import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.Db;

import java.util.List;

/**
 * Created by chenyu on 15/12/8.
 */
public class RadcheckService {
    public static final RadcheckService me = new RadcheckService();

    /**
     * 使用
     * @param userName
     * @param password
     * @return
     */
    public boolean login(String userName ,String password){
        List<Record> list = Db.find("select * from radcheck where username = ? and value = ?",userName,password);
        if(list.size() == 1){
            return true;
        }else {
            return false;

        }
    }
}
